using System;
using System.Xml.Serialization;
using System.Collections;
using System.Globalization;
using System.IO;

namespace ExchangeSiteParameters
{
	/// <summary>
	/// Summary description for SiteParametersClass.
	/// </summary>
	[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.org/exporters.xsd", IsNullable=false)]
	public class SiteParameters 
	{
    
		/// <remarks/>
		//[System.Xml.Serialization.XmlElementAttribute("Instance")]
		//public ExporterServiceInstance[] Items;

		/// <remarks/>
		[System.Xml.Serialization.XmlElementAttribute("Parameter", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public  SiteParametersCollection List;
		
		public SiteParameters()
		{
			List=new SiteParametersCollection();
		}
		public bool Serialize(string fileName)
		{
			StreamWriter exportItemsFile = new StreamWriter(fileName,false);
			XmlSerializer mySerializer = new XmlSerializer(typeof(ExchangeSiteParameters.SiteParameters));
			mySerializer.Serialize(exportItemsFile , this); 
			return(true);
		}
		/// <remarks/>
	}

	/// <remarks/>
	public class Parameter 
	{
		/// <remarks/>
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string ContainerType;
    
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string ManagedPath;

		/// <remarks/>
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string SiteName;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string Owner;
	
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string Contact;

		
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string conversation;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string store;
		
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string exportSecurity;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string addWebPart;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string ServerName;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string Alias;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string FolderToExtract;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string StartFromFolder;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string RestrictBySize;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string ConversationIndex;
		
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string MailSaveType;
		
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string Root;
		
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string ContainerTypeIndex;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string XMLProps;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string onlyTopFolder;

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string dateTimeThreshHold="";

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string dateTimeEnd="";

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string LastSucceededDate="";

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string Interval="";

		
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string ConvertTo="";
		
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string recurrencedatatag="";
		
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string isrecurringtag="";

		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public string logFile= "";
	}
	public class SiteParametersCollection : ICollection
	{
		public SiteParametersCollection()
		{
			parameterCollection=new ArrayList();
		}
		
		private ArrayList parameterCollection;
		#region ICollection Members

		public bool IsSynchronized
		{
			get
			{
				// TODO:  Add ExchangePropertyCollection.IsSynchronized getter implementation
				return parameterCollection.IsSynchronized;
			}
		}

		public int Count
		{
			get
			{
				// TODO:  Add ExchangePropertyCollection.Count getter implementation
				return parameterCollection.Count;
			}
		}

		public void CopyTo(Parameter[] a, int index)
		{
			parameterCollection.CopyTo(a, index);
		}

		public void CopyTo(Array a, int index)
		{
			parameterCollection.CopyTo(a, index);
		}

		public object SyncRoot
		{
			get
			{
				// TODO:  Add ExchangePropertyCollection.SyncRoot getter implementation
				return parameterCollection.SyncRoot;
			}
		}

		#endregion

		#region IEnumerable Members

		public IEnumerator GetEnumerator()
		{
			// TODO:  Add ExchangePropertyCollection.GetEnumerator implementation
			return parameterCollection.GetEnumerator();
		}
		public Parameter this[int index]
		{
			get{return (Parameter) parameterCollection[index];}
		}
		/// <summary>
		/// Adds an object to the end of the ArrayList.
		/// </summary>
		/// <param name="newProfile">New Profile to be added to the list</param>
		public void Add(Parameter newItem)
		{
			parameterCollection.Add(newItem);
		}


		#endregion

	}
}
